//
//  OrderDetailVC.m
//  SDHuiYuShoping
//
//  Created by luojiao on 2017/6/8.
//  Copyright © 2017年 luojiao. All rights reserved.
//

#import "OrderDetailVC.h"
#import "OrderDetailCell.h"
#import "ChoseAddressVC.h"

@interface OrderDetailVC ()

@end

@implementation OrderDetailVC

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.tableView.tableHeaderView = self.headerView;
    self.tableView.tableFooterView = self.footerView;
    self.tableView.separatorStyle = NO;
    self.lineImage.image = [UIImage imageNamed:@"dashed_line"];
    
    //设置返回按钮
    [self.backButton setImage:[UIImage imageNamed:@"back_white_btn"] forState:UIControlStateNormal];
    [self.backButton setImageEdgeInsets:UIEdgeInsetsMake(0, -50, 0, 0)];
    [self.backButton setTitle:@"返回" forState:UIControlStateNormal];
    [self.backButton setTitleEdgeInsets:UIEdgeInsetsMake(0, -40, 0, 0)];
    
    [self.addressNextButton setImage:[UIImage imageNamed:@"unfold_btn"] forState:UIControlStateNormal];
    [self.addressNextButton setImageEdgeInsets:UIEdgeInsetsMake(0, 0, 0, -(APP_WIDTH - 30))];
    
//    [self.payNextButton setImage:[UIImage imageNamed:@"unfold_btn"] forState:UIControlStateNormal];
//    [self.payNextButton setImageEdgeInsets:UIEdgeInsetsMake(0, 0, 0, -(APP_WIDTH - 30))];
}

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    self.tabBarController.tabBar.hidden = YES;
    //设置状态栏颜色为白色
    [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent;

}
- (IBAction)backButtonClick:(id)sender
{
    
    [self.navigationController popViewControllerAnimated:YES];
}
- (IBAction)addressNextButton:(id)sender
{
    ChoseAddressVC *choseAddressVC = [[ChoseAddressVC alloc] init];
    [self.navigationController pushViewController:choseAddressVC animated:YES];
}

- (IBAction)chosePayButton:(id)sender {
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - tableViewdelegate

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 200;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 2;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    OrderDetailCell *cell;

    static NSString *cellIdentifier = @"orderCell";
    cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
    if (!cell)
       {
        cell = [[NSBundle mainBundle] loadNibNamed:@"OrderDetailCell" owner:self options:nil][0];
       }
    //cell 没有选中状态
    cell.selectionStyle = UITableViewCellSelectionStyleNone;

    return cell;
}



/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
